<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="自定义QQ分享生成器 - 简洁、直观、强悍的QQ分享生成工具，让自定义QQ分享更迅速、简单。">
	<meta name="keywords" content="QQ, share, DIY">
	<meta name="author" content="晨旭 <lolicon@papapoi.com>">

	<title>自定义QQ分享生成器</title>
	<!--[if lte IE 8]><script>alert("您的浏览器版本过老，无法兼容本网站，为了兼容性和您的安全，请升级您的浏览器或使用webkit内核的浏览器。");window.location.href='http://www.chenxublog.com/explorer.html';</script><![endif]-->
	<link rel="shortcut icon" href="http://source.papapoi.com/www&@favicon.ico">
	<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/2.3.2/css/bootstrap.min.css">
	<script type="text/javascript">//勿压缩此处
		function request(paras) {
		var url = location.href;
		var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
		var paraObj = {};
		for (var i = 0; j = paraString[i]; i++) {
			paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j
					.indexOf("=") + 1, j.length);
		}
		var returnValue = paraObj[paras.toLowerCase()];
		if (typeof (returnValue) == "undefined") {
			return "";
		} else {
			return returnValue;
		}
	}
		// 获取终端的相关信息
		var Terminal = {
			// 辨别移动终端类型
			platform : function() {
				var u = navigator.userAgent, app = navigator.appVersion;
				return {
					// 是否为iPhone或者QQHD浏览器
					iPhone : u.indexOf('iPhone') > -1,
					// 是否iPad
					iPad : u.indexOf('iPad') > -1,
					// 是否微信
					weixin : u.toLowerCase().indexOf("micromessenger") > -1,
					// android终端或者uc浏览器
					android : u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
					// 是否WinPhone
					wp : u.indexOf('Windows Phone') > -1
				};
			}(),
		}
		
		// 根据不同的终端，跳转到不同的地址
		if (Terminal.platform.weixin) {
			location.href = 'http://qqshare.papapoi.com/mobi.html';
		} else if (Terminal.platform.wp) {
			location.href = 'http://qqshare.papapoi.com/mobi.html';
		} else if (Terminal.platform.android) {
			var channelFrom=request('channel')==null?"":request('channel');
			if(channelFrom == "biliad")
				location.href = 'http://qqshare.papapoi.com/mobi.html';
			else
				location.href = 'http://qqshare.papapoi.com/mobi.html';
		} else if (Terminal.platform.iPhone) {
			location.href = 'http://qqshare.papapoi.com/mobi.html';
		} else if (Terminal.platform.iPad) {
			location.href = 'http://qqshare.papapoi.com/mobi.html';
		}
		
	</script>
	<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
	<script src="http://cdn.bootcss.com/bootstrap/2.3.2/js/bootstrap.min.js"></script>
	<script type="text/javascript">
	var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
	var base64DecodeChars = new Array(
	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
	52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
	-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
	15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
	-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
	41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
	//base64编码
	function base64encode(str) {
	var out, i, len;
	var c1, c2, c3;
	len = str.length;
	i = 0;
	out = "";
	while(i < len) {
	c1 = str.charCodeAt(i++) & 0xff;
	if(i == len)
	{
	out += base64EncodeChars.charAt(c1 >> 2);
	out += base64EncodeChars.charAt((c1 & 0x3) << 4);
	out += "==";
	break;
	}
	c2 = str.charCodeAt(i++);
	if(i == len)
	{
	out += base64EncodeChars.charAt(c1 >> 2);
	out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
	out += base64EncodeChars.charAt((c2 & 0xF) << 2);
	out += "=";
	break;
	}
	c3 = str.charCodeAt(i++);
	out += base64EncodeChars.charAt(c1 >> 2);
	out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
	out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6));
	out += base64EncodeChars.charAt(c3 & 0x3F);
	}
	return out;
	}

	//utf8转utf16，以便支持中文base64转码
	function utf16to8(str) {
	var out, i, len, c;
	out = "";
	len = str.length;
	for(i = 0; i < len; i++) {
	c = str.charCodeAt(i);
	if ((c >= 0x0001) && (c <= 0x007F)) {
	out += str.charAt(i);
	} else if (c > 0x07FF) {
	out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
	out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
	out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
	} else {
	out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
	out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
	}
	}
	return out;
	}
	//用于创建XMLHttpRequest对象 
	function createXmlHttp() {
		//根据window.XMLHttpRequest对象是否存在使用不同的创建方式 
		if (window.XMLHttpRequest) {
			xmlHttp = new XMLHttpRequest(); //FireFox、Opera等浏览器支持的创建方式 
		} else {
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); //IE浏览器支持的创建方式 
		}
	}
	//直接通过XMLHttpRequest对象获取远程网页源代码 
	function getSource() {
		var url = document.getElementById("input5").value; //获取目标地址信息
		//地址为空时提示用户输入 
		if (url == "") {
			Submit();
			return;
		}
		url = "http://qqshare.papapoi.com/sget.php?url="+url;
		document.getElementById("getok").innerHTML="正在加载……"
		createXmlHttp(); //创建XMLHttpRequest对象 
		xmlHttp.onreadystatechange = writeSource; //设置回调函数 
		xmlHttp.open("GET", url, true);
		xmlHttp.send(null);
	}

	//将远程网页源代码写入页面文字区域 
	function writeSource() {
		if (xmlHttp.readyState == 4) {
			var val1 = document.getElementById('input1').value,
				val2 = document.getElementById('input2').value;
				val3 = document.getElementById('input3').value;
				val4 = document.getElementById('input4').value;
			val1=base64encode(utf16to8(val1));
			val2=base64encode(utf16to8(val2));
			document.getElementById("getok").innerHTML = "<p class=\"text-center\"><a href=\"http://connect.qq.com/widget/shareqq/index.html?url=http://qqshare.papapoi.com/"+val1+"/u/"+val2+"/u/"+xmlHttp.responseText+"&k=YOzK2k&desc=&title=不必理会此处，直接分享&summary=不必理会此处，直接分享&pics="+val4+"&site="+val3+"&style=201&width=32&height=32\" target=\"_blank\">生成成功！点击即可分享！</a><br>如遇分享失败，多试几次即可</p>";
		}
	}

	function Submit() {
	var val1 = document.getElementById('input1').value,
		val2 = document.getElementById('input2').value;
		val3 = document.getElementById('input3').value;
		val4 = document.getElementById('input4').value;
	val1=base64encode(utf16to8(val1));
	val2=base64encode(utf16to8(val2));
	document.getElementById("getok").innerHTML="<p class=\"text-center\"><a href=\"http://connect.qq.com/widget/shareqq/index.html?url=http://qqshare.papapoi.com/"+val1+"/o/"+val2+"&k=YOzK2k&desc=&title=不必理会此处，直接分享&summary=不必理会此处，直接分享&pics="+val4+"&site="+val3+"&style=201&width=32&height=32\" target=\"_blank\">生成成功！点击即可分享！</a><br>如遇分享失败，多试几次即可</p>";
	}

	function checkbox()
	{
	  var checkbox = document.getElementById('url');
	  if(checkbox.checked){
		input5.disabled=0;
	  }else{
		input5.disabled=1;
	  }
	}
	
	function formSubmitClick() {
		var val1 = document.getElementById('input1').value,
			val2 = document.getElementById('input2').value;
			val3 = document.getElementById('input3').value;
			val4 = document.getElementById('input4').value;
		  if (!val1) {
			document.getElementById("getok").innerHTML="标题不能为空!<br>生成失败，请修改参数重试。";
			return;
		}
		if (!val2) {
			document.getElementById("getok").innerHTML="内容不能为空!<br>生成失败，请修改参数重试。";
			return;
		}
		if (!val3) {
			document.getElementById("getok").innerHTML="来自信息不能为空!<br>生成失败，请修改参数重试。";
			return;
		}
		if (!val4) {
			document.getElementById("getok").innerHTML="图片网址不能为空!<br>生成失败，请修改参数重试。";
			return;
		}
	  var checkbox = document.getElementById('url');
	  if(checkbox.checked){
		getSource();
	  }else{
		Submit();
	  }
	}
	</script>
	
<script>
function model1()
{
document.getElementById('input1').value='群主开启了群交易';
document.getElementById('input2').value='管理员迟迟不动手，背后怕是有肮脏的屁眼交易！';
document.getElementById('input3').value='群交易';
document.getElementById('input4').value='http://i11.tietuku.com/694959a6e9f12421.jpg';
}
function model2()
{
document.getElementById('input1').value='本群已进入赛艇模式';
document.getElementById('input2').value='请各位成员提高自身姿势水平,学好基本法,跑过香港记者。';
document.getElementById('input3').value='群膜蛤';
document.getElementById('input4').value='http://i11.tietuku.com/a0340138ea2a13cd.jpg';
}
function model3()
{
document.getElementById('input1').value='群主开启了群女装';
document.getElementById('input2').value='群主开启了群女装，快来进行肮脏的屁眼交易吧~';
document.getElementById('input3').value='群女装';
document.getElementById('input4').value='http://i11.tietuku.com/a6d7c0cb959cb612.jpg';
}
function model4()
{
document.getElementById('input1').value='群主开启了群援交';
document.getElementById('input2').value='群主开启了群援交，快来穿上女装援交吧~';
document.getElementById('input3').value='群援交';
document.getElementById('input4').value='http://i13.tietuku.com/36b4ff73e304f930.jpg';
}
</script>
</head>
<body>


<div class="container-fluid">



			<div class="navbar">
				<div class="navbar-inner">
					<div class="container-fluid">
						 <a data-target=".navbar-responsive-collapse" data-toggle="collapse" class="btn btn-navbar"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a> <a href="http://qqshare.papapoi.com/" class="brand">自定义QQ分享生成器</a>
						<div class="nav-collapse collapse navbar-responsive-collapse">
							<ul class="nav">
								<li class="active">
									<a>自定义QQ分享生成器</a>
								</li>
								<li>
									<a href="http://www.biubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiubiu.com/" target="_blank">长链接生成器</a>
								</li>
								<li>
									<a href="http://tieba.papapoi.com/" target="_blank">糖拌苦力怕贴吧自动签到</a>
								</li>
								<li>
									<a href="http://bili.papapoi.com/" target="_blank">哔哩哔哩已删除视频搜索&播放网站</a>
								</li>
							</ul>
							<ul class="nav pull-right">
								<li>
									<a href="#">欢迎加入收藏夹~(Ctrl+D即可)</a>
								</li>
								<li class="divider-vertical">
								</li>
								<li>
									<a href="http://www.chenxublog.com" target="_blank">本站由晨旭提供支持</a>
								</li>
							</ul>
						</div>
						
					</div>
				</div>
				
			</div>	
	<div class="row-fluid">
		<div class="span6">
			<p class="text-right">
				<span>各部分说明↓↓↓↓↓↓↓↓</span>
			</p>
			<p class="text-right">
				<img alt="" src="http://ww1.sinaimg.cn/mw690/c03c4ee6gw1f15lat4mkyj20co09fgmb.jpg" />
			</p>
		</div>
		<div class="span6">
			<p class="text-left">
				↓↓↓↓↓↓↓↓↓↓举例
			</p>
			<p class="text-left">
				<img alt="" src="http://ww4.sinaimg.cn/mw690/c03c4ee6gw1f15lasjy0xj20bw07qq35.jpg" />
			</p>
		</div>
	</div>
	
	<div class="row-fluid">
		<div class="span12">
			<p>	<div class="row-fluid">
		<div class="span12">
			<p class="text-center">
				<a id="model1" role="button" class="btn btn-info btn-small" data-toggle="modal" onclick="model1()">使用群交易模板</a>
				<a id="model2" role="button" class="btn btn-info btn-small" data-toggle="modal" onclick="model2()">使用群膜蛤模板</a>
				<a id="model3" role="button" class="btn btn-info btn-small" data-toggle="modal" onclick="model3()">使用群女装模板</a>
				<a id="model3" role="button" class="btn btn-info btn-small" data-toggle="modal" onclick="model4()">使用群援交模板</a>
				</p>
		</div>
	</div>
	
	<div class="row-fluid">
		<div class="span12">
			<form id="form" class="form-inline">
			<p class="text-center">
				标题：(建议不超过10个字)<input id="input1" type="text" style="width:100%;" /><br /><br /> 内容：(建议不超过30字，否则可能导致分享失败)<input id="input2" type="text" style="width:100%;"/><br /><br /> 来自信息：<input id="input3" type="text" style="width:100%;"/><br /><br /> 图片网址：(建议到免费外链图片网站获取图片外链，<a href="http://tietuku.com/upload" target="_blank">点我去免费图床</a>)<input id="input4" type="text" style="width:100%;"/><br /><br /><input type="checkbox" id="url" onclick="checkbox()"/><label for="url">在分享页打开指定的网页</label> 网址：<input id="input5" type="text" style="width:100%;" disabled=1/>
			</p>
			</form>
			<div class="row-fluid">
				<div class="span12">
					 <a id="modal-378123" href="#modal-container-378123" role="button" class="btn btn-info btn-block btn-large" data-toggle="modal" onclick="formSubmitClick()">点我生成链接</a>
					
					<div id="modal-container-378123" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
						<div class="modal-header">
							 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
							<h3 id="myModalLabel">
								生成结果
							</h3>
						</div>
						<div class="modal-body">
								<div id='getok'></div>
						</div>
						<div class="modal-footer">
							 <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row-fluid">
		<div class="span12">
			<p>	<div class="row-fluid">
		<div class="span12">
			<p class="text-center">
				本站由<a href="http://www.chenxublog.com" target="_blank">晨旭</a>提供支持<br>
				<a href="http://www.chenxublog.com/2016/02/15/diy-qq-share.html" target="_blank">点我提交建议和汇报问题</a><br>
				<a href="http://www.miitbeian.gov.cn/" target="_blank">苏ICP备15008986号</a>
			</p>
		</div>
	</div>
	<div class="row-fluid">
		<div class="span6">
			<p class="text-right">
				<img src='http://i12.tietuku.com/683e05e6796e2ed5.png'/>
			</p>
		</div>
		<div class="span6">
			<p class="text-left">
				<img src='http://i12.tietuku.com/683e05e6796e2ed5.png'/>
			</p>
		</div>
	</div>
	<div class="row-fluid">
		<div class="span12">
			<div class="ds-thread" data-thread-key="1" data-title="自定义QQ分享生成器" data-url="http://qqshare.papapoi.com/"></div>
			<script type="text/javascript">var duoshuoQuery={short_name:"qqsharediy"};(function(){var ds=document.createElement('script');ds.type='text/javascript';ds.async=true;ds.src=(document.location.protocol=='https:'?'https:':'http:')+'//static.duoshuo.com/embed.js';ds.charset='UTF-8';(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(ds)})();</script>
		</div>
	</div>
</div>
</body>